package com.zbkj.crmeb.store.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.PageParamRequest;
import com.zbkj.crmeb.store.model.ChannelFreeShippingActivity;
import com.zbkj.crmeb.store.request.ChannelFreeShippingActivityRequest;
import com.zbkj.crmeb.store.response.ChannelFreeShippingActivityResponse;
import com.zbkj.crmeb.store.response.StoreCartResponse;
import com.zbkj.crmeb.user.model.UserAddress;

import java.util.List;
import java.util.Map;

public interface ChannelFreeShippingActivityService extends IService<ChannelFreeShippingActivity> {

    /**
     * 功能描述: 新增或保存满额包邮活动
     * @Param: [request, merId]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2022/12/30 10:24
     */
    Boolean saveOrUpdateActivity(ChannelFreeShippingActivityRequest request, Integer merId);

    /**
     * 功能描述: 通过活动id删除满额包邮
     * @Param: [activityId]
     * @Return: java.lang.Boolean
     * @Author: wangzh
     * @Date: 2022/12/30 15:25
     */
    Boolean removeActivity(Integer activityId);

    /**
     * 功能描述: 列表查询
     * @Param: [activityName, request, merId]
     * @Return: java.util.List<com.zbkj.crmeb.store.response.ChannelFreeShippingActivityResponse>
     * @Author: wangzh
     * @Date: 2022/12/30 15:45
     */
    List<ChannelFreeShippingActivityResponse> getList(String activityName, PageParamRequest request, Integer merId);

    /**
     * 功能描述: 获取详情
     * @Param: [activityId]
     * @Return: com.zbkj.crmeb.store.response.ChannelFreeShippingActivityResponse
     * @Author: wangzh
     * @Date: 2022/12/30 16:24
     */
    ChannelFreeShippingActivityResponse getInfo(Integer activityId);
    /**
     * 功能描述: 获取当前商户下正在进行中的满额包邮活动
     * @Param: [merId]
     * @Return: java.util.List<com.zbkj.crmeb.store.model.ChannelFreeShippingActivity>
     * @Author: wangzh
     * @Date: 2022/12/30 13:51
     */
    List<ChannelFreeShippingActivity> getInProcessActivities(Integer merId);

    /**
     * 功能描述: 商品详情获取满额包邮信息
     * @Param: [productId]
     * @Return: com.zbkj.crmeb.store.model.ChannelFreeShippingActivity
     * @Author: wangzh
     * @Date: 2022/12/30 17:02
     */
    ChannelFreeShippingActivity getProductInfo(Integer productId, Integer merId);
    /**
     * 功能描述: 商品详情获取满额包邮信息
     * @Param: [productId]
     * @Return: com.zbkj.crmeb.store.model.ChannelFreeShippingActivity
     * @Author: wangzh
     * @Date: 2022/12/30 17:02
     */
    Map<Integer, ChannelFreeShippingActivity> getStoreProductInfoMap(List<Integer> productIds, Integer merId);

    /**
     * 功能描述: 判断购物车商品参与的满额包邮活动是否满足包邮条件
     * @Param: [storeCartResponse, userAddress, merId]
     * @Return: java.util.List<java.lang.Integer>
     * @Author: wangzh
     * @Date: 2023/1/12 13:48
     */
    List<Integer> getFreeShippingActivityId(List<StoreCartResponse> storeCartResponse, UserAddress userAddress, Integer merId);
}
